package com.dinpay.plugin.d;

import com.dinpay.plugin.b.d;
import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.regex.Matcher;
import java.util.regex.Pattern;

public final class e
{
  public static String a;

  public static boolean a(d paramd)
  {
    if (paramd == null)
      return false;
    String str1 = paramd.a();
    if ((str1 == null) || (str1.length() == 0) || (str1.equals("null")));
    for (int i = 1; i != 0; i = 0)
    {
      a = "MERCHANT_CODE_IS_NULL";
      return false;
    }
    if (str1.length() > 20)
    {
      a = "MERCHANT_CODE_TOO_LONG";
      return false;
    }
    String str2 = paramd.b();
    if ((str2 == null) || (str2.length() == 0) || (str2.equals("null")));
    for (int j = 1; j != 0; j = 0)
    {
      a = "NOTIFY_URL_IS_NULL";
      return false;
    }
    if (str2.length() > 200)
    {
      a = "NOTIFY_URL_IS_TOO_LONG";
      return false;
    }
    String str3 = paramd.c();
    if ((str3 == null) || (str3.length() == 0) || (str3.equals("null")));
    for (int k = 1; k != 0; k = 0)
    {
      a = "INTERFACE_VERSION_IS_NULL";
      return false;
    }
    if (!c.b.equals(str3))
    {
      a = "ILLEGAL_INTERFACE_VERSION";
      return false;
    }
    String str4 = paramd.d();
    if ((str4 == null) || (str4.length() == 0) || (str4.equals("null")));
    for (int m = 1; m != 0; m = 0)
    {
      a = "SIGN_TYPE_IS_NULL";
      return false;
    }
    String str5 = paramd.e();
    if ((str5 == null) || (str5.length() == 0) || (str5.equals("null")));
    for (int n = 1; n != 0; n = 0)
    {
      a = "SIGN_IS_NULL";
      return false;
    }
    String str6 = paramd.f();
    if ((str6 == null) || (str6.length() == 0) || (str6.equals("null")));
    for (int i1 = 1; i1 != 0; i1 = 0)
    {
      a = "ORDER_NO_IS_NULL";
      return false;
    }
    if (str6.length() > 64)
    {
      a = "ORDER_NO_IS_TOO_LONG";
      return false;
    }
    if (!Pattern.compile("^[A-Za-z0-9]{1,64}$").matcher(str6).matches())
    {
      a = "ORDER_NO_IS_FORMAT";
      return false;
    }
    String str7 = paramd.g();
    if ((str7 == null) || (str7.length() == 0) || (str7.equals("null")));
    for (int i2 = 1; i2 != 0; i2 = 0)
    {
      a = "ORDER_TIME_IS_NULL";
      return false;
    }
    if (!a(str7, c.c))
    {
      a = "ILLEGAL_ORDER_TIME_FORMAT";
      return false;
    }
    String str8 = paramd.h();
    if ((str8 == null) || (str8.length() == 0) || (str8.equals("null")));
    for (int i3 = 1; i3 != 0; i3 = 0)
    {
      a = "ORDER_AMOUNT_IS_NULL";
      return false;
    }
    if (!Pattern.compile("^(([1-9]\\d*)|([0]))(\\.\\d{1,2})?$").matcher(str8).matches())
    {
      a = "ILLEGAL_ORDER_AMOUNT_FORMAT";
      return false;
    }
    if (Double.parseDouble(str8) <= 0.0D)
    {
      a = "ORDER_AMOUNT_ZERO";
      return false;
    }
    if (str8.contains("."))
      str8 = str8.substring(0, str8.indexOf("."));
    if (str8.length() > 10)
    {
      a = "ORDER_AMOUNT_IS_TOO_LARGE";
      return false;
    }
    String str9 = paramd.i();
    if ((str9 == null) || (str9.length() == 0) || (str9.equals("null")));
    for (int i4 = 1; i4 != 0; i4 = 0)
    {
      a = "PRODUCT_NAME_IS_NULL";
      return false;
    }
    if (str9.length() > 100)
    {
      a = "PRODUCT_NAME_IS_TOO_LONG";
      return false;
    }
    if (!Pattern.compile("[一-龥\\w-:/=&@,\\+\\|\\?\\.\\^\\s]*").matcher(str9).matches())
    {
      a = "PARAMETER_ILL";
      return false;
    }
    String str10 = paramd.n();
    if ((str10 == null) || (str10.length() == 0) || (str10.equals("null")));
    for (int i5 = 1; (i5 == 0) && (!"0".equals(str10)) && (!"1".equals(str10)); i5 = 0)
    {
      a = "ILLEGAL_REDO_FLAG";
      return false;
    }
    String str11 = paramd.k();
    int i6;
    if ((str11 == null) || (str11.length() == 0) || (str11.equals("null")))
      i6 = 1;
    while (i6 == 0)
      if (str11.length() > 60)
      {
        a = "PRODUCT_CODE_IS_TOO_LONG";
        return false;
        i6 = 0;
      }
      else if (!Pattern.compile("[一-龥\\w-:/=&@,\\+\\|\\?\\.\\^\\s]*").matcher(str11).matches())
      {
        a = "PARAMETER_ILL";
        return false;
      }
    String str12 = paramd.l();
    int i7;
    int i10;
    if ((str12 == null) || (str12.length() == 0) || (str12.equals("null")))
    {
      i7 = 1;
      if (i7 != 0)
        break label959;
      if ((str12 != null) && (str12.length() != 0) && (!str12.equals("null")))
        break label918;
      i10 = 1;
      label892: if (i10 == 0)
        break label924;
    }
    label918: label924: for (boolean bool = false; ; bool = Pattern.compile("^\\d{1,}$").matcher(str12).matches())
    {
      if (bool)
        break label942;
      a = "ILLEGAL_PRODUCT_NUM_FORMAT";
      return false;
      i7 = 0;
      break;
      i10 = 0;
      break label892;
    }
    label942: if (str12.length() > 10)
    {
      a = "ILLEGAL_PRODUCT_TOO_LONG";
      return false;
    }
    label959: String str13 = paramd.m();
    int i8;
    if ((str13 == null) || (str13.length() == 0) || (str13.equals("null")))
      i8 = 1;
    while (i8 == 0)
      if (str13.length() > 300)
      {
        a = "PRODUCT_DESC_IS_TOO_LONG";
        return false;
        i8 = 0;
      }
      else if (!Pattern.compile("[一-龥\\w-:/=&@,\\+\\|\\?\\.\\^\\s]*").matcher(str13).matches())
      {
        a = "PARAMETER_ILL";
        return false;
      }
    String str14 = paramd.j();
    int i9;
    if ((str14 == null) || (str14.length() == 0) || (str14.equals("null")))
      i9 = 1;
    while (i9 == 0)
      if (str14.length() > 500)
      {
        a = "EXTRA_RETURN_PARAM_IS_TOO_LONG";
        return false;
        i9 = 0;
      }
      else if (!Pattern.compile("[一-龥\\w-:/=&@,\\+\\|\\?\\.\\^\\s]*").matcher(str14).matches())
      {
        a = "PARAMETER_ILL";
        return false;
      }
    return true;
  }

  private static boolean a(String paramString1, String paramString2)
  {
    SimpleDateFormat localSimpleDateFormat = new SimpleDateFormat(paramString2);
    try
    {
      Date localDate = localSimpleDateFormat.parse(paramString1);
      return paramString1.equals(localSimpleDateFormat.format(localDate));
    }
    catch (Exception localException)
    {
    }
    return false;
  }
}

/* Location:           C:\Users\user\Desktop\dd28_pcdd720\classes_dex2jar.jar
 * Qualified Name:     com.dinpay.plugin.d.e
 * JD-Core Version:    0.6.2
 */